import { useFormField } from "../../context/form-context";
//文本组件
export default function ({ id, field, label, rules, showLabel = false, onChange, onBlur, displayFormatter, valueFormatter, required, ...others }) {
  const { input } = useFormField({
    field,
    rules,
    onChange,
    displayFormatter,
    valueFormatter,
    onBlur,
  });

  return input.value === undefined ? null : input.value;
}
